
const state = {
  finQueryParams: {
     accountId: undefined,
     yearMonth: undefined
  }
}

const mutations = {
  CHANGE_QUERY_PARAMS(state, value) {
    state.finQueryParams.accountId = value.fundAccountId
    state.finQueryParams.yearMonth = value.yearMonth
  }
}

const actions = {
  changeQueryParams(context, value) {
    if (value.fundAccountId && value.yearMonth) {
      context.commit('CHANGE_QUERY_PARAMS', value)
    }
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
